import request from '@/utils/request'

// 查询信箱列表
export function listXinxiang(query) {
  return request({
    url: '/web/xinxiang/list',
    method: 'get',
    params: query
  })
}

// 查询信箱详细
export function getXinxiang(id) {
  return request({
    url: '/web/xinxiang/' + id,
    method: 'get'
  })
}

// 新增信箱
export function addXinxiang(data) {
  return request({
    url: '/web/xinxiang',
    method: 'post',
    data: data
  })
}

// 修改信箱
export function updateXinxiang(data) {
  return request({
    url: '/web/xinxiang',
    method: 'put',
    data: data
  })
}

// 删除信箱
export function delXinxiang(id) {
  return request({
    url: '/web/xinxiang/' + id,
    method: 'delete'
  })
}

// 导出信箱
export function exportXinxiang(query) {
  return request({
    url: '/web/xinxiang/export',
    method: 'get',
    params: query
  })
}